package com.mapapp.flutter_mapapp.bean;

import android.os.Parcel;
import android.os.Parcelable;

import java.util.ArrayList;

public class MapDetailBean implements Parcelable {
    private String id;
    private String taskId;
    private String regionId;
    private String regionName;
    private String parentRegionName;
    private String address;
    private String parentId;
    private int isRoot;
    private String bh;
    private String longitude;
    private String latitude;
    private int level;
    private String processNow;
    private String processNowName;
    private String createTime;
    private String editTime;
    private int levelNumber;
    private ArrayList<ProcessBean> processes;
    private ArrayList<ChildrenBean> children;
    private boolean leaf;
    private int type;

    public int getType() {
        return type;
    }

    public void setType(int type) {
        this.type = type;
    }

    protected MapDetailBean(Parcel in) {
        id = in.readString();
        taskId = in.readString();
        regionId = in.readString();
        regionName = in.readString();
        parentRegionName = in.readString();
        address = in.readString();
        parentId = in.readString();
        isRoot = in.readInt();
        bh = in.readString();
        longitude = in.readString();
        latitude = in.readString();
        level = in.readInt();
        processNow = in.readString();
        processNowName = in.readString();
        createTime = in.readString();
        editTime = in.readString();
        levelNumber = in.readInt();
        processes = in.createTypedArrayList(ProcessBean.CREATOR);
        children = in.createTypedArrayList(ChildrenBean.CREATOR);
        leaf = in.readByte()!=0;
        type = in.readInt();
    }

    public static final Creator<MapDetailBean> CREATOR = new Creator<MapDetailBean>() {
        @Override
        public MapDetailBean createFromParcel(Parcel in) {
            return new MapDetailBean(in);
        }

        @Override
        public MapDetailBean[] newArray(int size) {
            return new MapDetailBean[size];
        }
    };

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getTaskId() {
        return taskId;
    }

    public void setTaskId(String taskId) {
        this.taskId = taskId;
    }

    public String getRegionId() {
        return regionId;
    }

    public void setRegionId(String regionId) {
        this.regionId = regionId;
    }

    public String getRegionName() {
        return regionName;
    }

    public void setRegionName(String regionName) {
        this.regionName = regionName;
    }

    public String getParentId() {
        return parentId;
    }

    public void setParentId(String parentId) {
        this.parentId = parentId;
    }

    public int getIsRoot() {
        return isRoot;
    }

    public void setIsRoot(int isRoot) {
        this.isRoot = isRoot;
    }

    public String getBh() {
        return bh;
    }

    public void setBh(String bh) {
        this.bh = bh;
    }

    public String getLongitude() {
        return longitude;
    }

    public void setLongitude(String longitude) {
        this.longitude = longitude;
    }

    public String getLatitude() {
        return latitude;
    }

    public void setLatitude(String latitude) {
        this.latitude = latitude;
    }

    public int getLevel() {
        return level;
    }

    public void setLevel(int level) {
        this.level = level;
    }

    public String getProcessNow() {
        return processNow;
    }

    public void setProcessNow(String processNow) {
        this.processNow = processNow;
    }

    public String getProcessNowName() {
        return processNowName;
    }

    public void setProcessNowName(String processNowName) {
        this.processNowName = processNowName;
    }

    public String getCreateTime() {
        return createTime;
    }

    public void setCreateTime(String createTime) {
        this.createTime = createTime;
    }

    public String getEditTime() {
        return editTime;
    }

    public void setEditTime(String editTime) {
        this.editTime = editTime;
    }

    public int getLevelNumber() {
        return levelNumber;
    }

    public void setLevelNumber(int levelNumber) {
        this.levelNumber = levelNumber;
    }

    public ArrayList<ProcessBean> getProcesses() {
        return processes;
    }

    public void setProcesses(ArrayList<ProcessBean> processes) {
        this.processes = processes;
    }

    public ArrayList<ChildrenBean> getChildren() {
        return children;
    }

    public void setChildren(ArrayList<ChildrenBean> children) {
        this.children = children;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(id);
        dest.writeString(taskId);
        dest.writeString(regionId);
        dest.writeString(regionName);
        dest.writeString(parentRegionName);
        dest.writeString(address);
        dest.writeString(parentId);
        dest.writeInt(isRoot);
        dest.writeString(bh);
        dest.writeString(longitude);
        dest.writeString(latitude);
        dest.writeInt(level);
        dest.writeString(processNow);
        dest.writeString(processNowName);
        dest.writeString(createTime);
        dest.writeString(editTime);
        dest.writeInt(levelNumber);
        dest.writeTypedList(processes);
        dest.writeTypedList(children);
        dest.writeByte((byte)(leaf ?1:0));
        dest.writeInt(type);
    }

    public boolean isLeaf() {
        return leaf;
    }

    public void setLeaf(boolean leaf) {
        this.leaf = leaf;
    }

    public String getParentRegionName() {
        return parentRegionName;
    }

    public void setParentRegionName(String parentRegionName) {
        this.parentRegionName = parentRegionName;
    }
}
